﻿using System;
using System.Collections.Generic;

namespace YJKExcelFormTool
{
	public class ImportTableRow
	{
		public string Category
		{
			get
			{
				return this.m_Category;
			}
		}

		public List<ImportTableCell> Row
		{
			get
			{
				return this.m_Row;
			}
		}

		public ImportTableRow(string category, List<ImportTableCell> row)
		{
			this.m_Category = category;
			this.m_Row.Clear();
			this.m_Row.AddRange(row);
		}

		public int FindCellByCellName(string cellName)
		{
			for (int i = 0; i < this.m_Row.Count; i++)
			{
				if (this.m_Row[i].CellName.CompareTo(cellName) == 0)
				{
					return i;
				}
			}
			return -1;
		}

		private string m_Category;

		private List<ImportTableCell> m_Row = new List<ImportTableCell>();
	}
}
